<table>
  <tbody>
    <tr>
      <th>Id:</th>
      <td><?php echo $time_card->getId() ?></td>
    </tr>
    <tr>
      <th>Employee:</th>
      <td><?php echo $time_card->getEmployee() ?></td>
    </tr>
    <tr>
      <th>Pay period:</th>
      <td><?php echo $time_card->getPayPeriod() ?></td>
    </tr>
    <tr>
        <th>Time Registries</th>
        <td>
            <table>
    <tbody>
        <?php foreach ($timeCards as $timecard): ?>
            <?php if($timecard->getRestDay()==1){
                $class='class="freeday"';
            }else{
                $class='';
            }?>
            <tr <?php echo $class ?>>
                <td><?php echo ucfirst(format_date($timecard->getDate(), 'EEE')) ?></td>
                <td><?php echo format_date($timecard->getDate(), 'dd-MMM-yyyy') ?></td>
                <td><?php echo $timecard->getHolidayId()?></td>
                <td><?php echo $timecard->getShift1() ?></td>
                <td><?php echo $timecard->getShift2() ?></td>
                <td><?php echo $timecard->getShift3() ?></td>
                <td><?php echo $timecard->getPosition() ?></td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
        </td>
    </tr>

  </tbody>
</table>

<hr />

<a href="<?php echo url_for('timecards/edit?id='.$time_card->getId()) ?>">Edit</a>
&nbsp;
<a href="<?php echo url_for('timecards/index') ?>">List</a>
